<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="menu" content="assetMenu" />
<meta name="nav" content="0" />
<meta name="acc" content="_design"/>
<title>设计单位</title>
<!--  通用情况下 不引入 js css  表单验证  js 放置到页面中 -->
<%-- ui tabs --%>

<script type="text/javascript"
	src="<c:url value='/ext/ui/jquery-ui-1.8.12.custom.min.js'/>"></script>
<script>
		$(document).ready(function() {
			$("#addSign").click(function(){
				url="${ctx}/project/sign/design!input.action?projectId=${projectId}&contractKind=2";
				mm = openWindowAsDialog(url);
				if(mm){
					document.location.reload();
				}
			});
		});
		function showDept(url){
			var obj = new Object();
			mm = showDialogWindow(url);	
		}
		function showSign(url){
			var obj = new Object();
			mm = showDialogWindow(url);
			window.location.href = window.location.href;
	        window.location.reload;
		}
		function showUserDetails(url){
			var obj = new Object();
			mm = showDialogWindow(url);
		}
</script>
</head>
<body>
<div id="heading" class="sign"><h6>设计单位列表 </h6></div>
<form action="design.action" method="post" id="mainForm"
	class='yform'>
  <table border="0" cellspacing="0" cellpadding="0">
    <tr>
      <th>序号</th>
      <th>设计合同段名称</th>
      <th>设计单位名称</th>
      <th>办事处</th>
      <th>主要人员</th>
    </tr>
    <c:forEach items="${page.result}" var="design" varStatus="designNum">
    <tr >
      <td>${designNum.count}</td>
      <td><a href="#"  class="underline" onclick="showSign('${ctx}/project/sign/design!input.action?id=${design.id}&projectId=${projectId}&contractKind=2');">${design.contractOrder}</a></td>
      <td>${design.branchOrgCode.organization.orgName}</td>
      <td><a href="#"  class="underline" onclick="showDept('${ctx}/project/org/organization!input.action?id=${design.branchOrgCode.organization.id}&projectId=${projectId}&typeId=${contractKind}&deptId=${design.branchOrgCode.id}');">
      ${design.branchOrgCode.depName}</a> </td>
      <td><a href="#" class="underline" onclick="showUserDetails('${ctx}/project/sign/org/ext/userdepartment!userDetails.action?organizationId=${design.branchOrgCode.organization.id}&projectId=${projectId}&typeId=2&deptId=${design.branchOrgCode.id}');">进入</a></td>
    </tr>
    </c:forEach>
  </table>
<div class="type-button"><input id="addSign" type="button" class="submit" value="新增" />
	<input   type="button" value="返回" class="reset" onclick="history.back()" />
</div>
</form>
</body>
</html>
